﻿Public Class Thongkedocgia

    

    Private Sub btnshowreport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnshowreport.Click
        Dim rpt As New rptThongKeDocGia
        Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
        Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
        For Each tbCurrent In rpt.Database.Tables
            tliCurrent = tbCurrent.LogOnInfo
            With tliCurrent.ConnectionInfo
                .ServerName = Application.StartupPath + "\QUANLYTHUVIEN.accdb"
            End With
            tbCurrent.ApplyLogOnInfo(tliCurrent)
        Next tbCurrent

        rpt.SetParameterValue("Reporter", "Doan Thi Thuy") 'gan gia tri cho tham so
       
        CrystalReportViewerThongKeDocGia.ReportSource = rpt

    End Sub
End Class